SetGroupPathCamSwitch

Uses an axis group's travel distance to control a switch that triggers a digital output. When a group travels certain distance, a switch is turned on or off. A switch can be controlled by a forward and backward movement of a group.

Syntax

KsCommandStatus SetGroupPathCamSwitch(
     int Index,
     KsCommandStatus MotionCommand,
     int SwitchLength,
     McCamSwitch* Switches,
     int TrackLength,
     McOutput* Outputs,
     McTrack* Tracks,
     DWORD EnableMask
);

Parameters

Index [in]: the index of an axis group. Indexes are zero based. You can have up to 32 groups.

MotionCommand [in]: the command state of the group motion command a cam switch attaches.

SwitchLength [in]: how many switches in the switch array. Each track can have up to eight switches. SwitchLength ranges from 0 to 24.

Switches [in]: controls the switching actions. The track numbers need to be in order. See the McCamSwitch structure.

TrackLength [in]: how many tracks in the track array. The length of the output and track must be the same. For example, if there are two outputs, there must be two tracks. TrackLength ranges from 1 to 3.

Outputs [in]: selects which digital output will be controlled by the corresponding track. See the McOutput structure.

Tracks [in]: adds the compensation time and hysteresis to the switches on a track. TrackNumber is defined in Switches. See the McTrack structure.

EnableMask [in]: enables the different tracks. This parameter is 32 bits of BOOL. The corresponding track in the track array is enabled when its BOOL value is set to one.

Return value

Returns the KsCommandStatus structure.

Remarks

Example

N/A

Requirements

  RT Win32
Minimum supported version 4.1 4.1
Header ksmotion.h ksmotion.h
Library KsApi_Rtss.lib KsApi.lib

See also

SetAxisCamSwitch